package dem1;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URI;
import java.net.URL;
import java.net.URLConnection;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created with Intellij IDEA.
 * Description:
 * User: 33013
 * Date: 2023-03-31
 * Time: 8:28
 */
public class Test {

    public static void main(String[] args) {
        String s = "Java是三湖北人非人说java8德尔福的共同贪污JaVa11大二额吃骨头怨天尤人Java17热辐射";
        String regex1 = "((?i)(Java))(?=11|8|17)";
        String regex2 = "((?i)(Java))(?:11|8|17)";
        String regex3 = "((?i)(Java))(?=11|8|17)";
        String regex4 = "((?i)(Java))(?!11|8|17)";
        Pattern p = Pattern.compile(regex4);
        Matcher matcher = p.matcher(s);
        while (matcher.find()){
            System.out.println(matcher.group());
        }

    }

    public static void main1(String[] args) throws IOException {
        URL url = new URL("https://music.163.com/#/my/m/music/playlist?id=963665704");
        URLConnection conn = url.openConnection();
        BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
        String line;
        String regex = "[1-9]\\d{17}";
        //Pattern pattern = Pattern.compile(regex);
        while ((line = br.readLine()) != null){
            System.out.println(line);
//            Matcher matcher = pattern.matcher(line);
//            while (matcher.find()){
//                System.out.println(matcher.group());
//            }
        }
        br.close();
    }
}
